package com.yyh.synctool.client.job;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author xuan
 * @date 2021/12/16
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class TaskInfo
{
    /** 任务Id */
    private String taskId;
    /** 任务名称 */
    private String name;
    /** 开关状态[开/关] */
    private boolean open;
    /** 可用状态  [可用/不可用] */
    private boolean available;
    /** 上一次执行时间 */
    private String execTime;
    /** 异常原因 */
    private Exception exception;

    public TaskInfo(String taskId, String name, boolean open) {
        this.taskId = taskId;
        this.name = name;
        this.open = open;

        this.available = true;
        this.execTime = "----";
    }
}
